<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Title</title>

<link href="static/css/page.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="static/js/jquery.js"></script>
<script type="text/javascript" src="static/js/page.js"></script>
</head>
<body>
	<!--currentpage="1" numbercount="100"-->
	<div>
	<!--pagelistcount 设置一页显示多少条数据  -->
		<ul class="page" maxshowpageitem="5" pagelistcount="${newsInts.onePageNum}" id="page"></ul>
	</div>
	<br>
</body>
<script type="text/javascript">

//扩展jQuery发送非ajax的post请求：使用jQuery 在内存中建立一个form对象，然后调用这个对象的submit方法
$.extend({
    StandardPost:function(url,args){
        var form = $("<form method='post'></form>"),input;
        form.attr({"action":url});
        $.each(args,function(key,value){
            input = $("<input type='hidden'>");
            input.attr({"name":key});
            input.val(value);
            form.append(input);
        });
        form.submit();
    }
});

    var isfirst = true;
	var GG = {
		"kk" : function(mm) {
			if(!isfirst){
				var likeParam = '${likeParam}';
				var url = "newsint/${pageURL}?size=${newsInts.onePageNum}&page="+mm;
				if(likeParam!=''){
					//GET请求会中文乱码
					$.StandardPost('newsint/getLikeProNewsInt',{'page':mm,'${likeParamName}':'${likeParam}'});
				}else{
					window.location.href = url;
				}
			}else{
				isfirst = false;
			}
			
		}
	};
	console.log(${newsInts.total});
	console.log(${newsInts.pageNo});
	$("#page").initPage(${newsInts.total}, ${newsInts.pageNo}, GG.kk);
</script>
</html>